package com.extremeforce.function;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class ViewNetworkState {
	public static boolean getState(Context context){
		ConnectivityManager cwjManager = 
				(ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
		NetworkInfo info = cwjManager.getActiveNetworkInfo();
		if(info != null && info.isAvailable()){
			return true;
		}else{
			return false;
		}
	}
}
